﻿using System;
using System.Collections.Generic;
using System.Linq;
using Business.Data;
using Business.Models;

namespace Business.Services
{
    public class StoreService : IStoreService
    {
        private readonly IStoreRepository repository;

        public StoreService(IStoreRepository repository)
        {
            this.repository = repository;
        }

        public IList<string> ListGenres()
        {
            return repository.ListGenres();
        }

        public Genre GetGenre(string genreName)
        {
            return repository.LoadGenre(genreName);
        }

        public Album GetAlbum(int albumId)
        {
            return repository.LoadAlbum(albumId);
        }

        public IList<Album> GetAlbums()
        {
            return repository.LoadAlbums();
        }
    }
}